package org.makcro.sms.services.chat.web.client.services.message;

import java.util.List;

import org.makcro.sms.services.chat.web.shared.dto.HistoryItemDto;
import org.makcro.sms.services.chat.web.shared.dto.QuestionDto;

import com.extjs.gxt.ui.client.data.PagingLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface MessageServiceAsync {

	void getNewMessages(AsyncCallback<List<QuestionDto>> callback);

	void getUserHistory(String phoneNumber, AsyncCallback<List<HistoryItemDto>> callback);

	void checkAndReserveQuestion(Integer questionId, AsyncCallback<Boolean> callback);

	void cancelQuestionReservation(Integer questionId, AsyncCallback<Void> callback);

	void sendMessage(Long referenceId, String messageText, AsyncCallback<Long> callback);

	void getCurrentAgentsMessages(AsyncCallback<List<HistoryItemDto>> callback);

	void getAllHistory(AsyncCallback<List<HistoryItemDto>> callback);

	void getCurrentAgentsMessages(PagingLoadConfig loadConfig, AsyncCallback<PagingLoadResult<HistoryItemDto>> callback);

	void getAllHistory(PagingLoadConfig loadConfig, AsyncCallback<PagingLoadResult<HistoryItemDto>> callback);

}
